﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//Write a program that gets a number n and after that gets more n numbers and calculates and prints their sum. 

namespace _07SumSomeNumbers
{
    class _07SumSomeNumbers
    {
        static void Main(string[] args)
        {
            Console.Write("How many numbers are to be summed up:");
            double quantity = double.Parse(Console.ReadLine());
            double sum = 0;
            
            for (int i = 1; i <= quantity; i++)
            {
                Console.Write("Enter number {0}:", i);
                double number = double.Parse(Console.ReadLine());
                sum = sum + number;
            }
            Console.WriteLine("The sum of all enterd numbres is:{0}", sum);
            Console.ReadLine();
        }
    }
}
